<?php

/**
 * category actions.
 *
 * @package    briefingPropel
 * @subpackage category
 * @author     Your name here
 * @version    SVN: $Id: actions.class.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
 */
class categoryActions extends sfActions
{
  public function executeShow(sfWebRequest $request)
  {
    $this->category = $this->getRoute()->getObject();
    
    $this->pager = new sfPropelPager(
            'Clientorder',
            sfConfig::get('app_max_orders_on_category')
    );
    $this->pager->setCriteria($this->category->getActiveOrdersCriteria());
    $this->pager->setPage($request->getParameter('page',1));//set default page to the first one
    $this->pager->init();
  }
}
